<?php
namespace Tbf\Bundle\UpyunBundle\Tests;
abstract class TestCase extends \PHPUnit_Framework_TestCase
{
    public function initAppKernel()
    {
        $this->kernel = new \AppKernel('test',true);
        $this->kernel->boot();
    }
    public function get($name)
    {
        return $this->getKernel()->getContainer()->get($name);
    }
    public function getParameter($name)
    {
        return $this->getKernel()->getContainer()->getParameter($name);
    }
    /**
     *
     * @return Symfony\Compoent\HttpKernel\Kernel;
     */
    public function getKernel()
    {
        if ($this->kernel===null) {
            $this->initAppKernel();
        }

        return $this->kernel;
    }
}
